chdir
Change directory
chdir()
function changes the current directory.
Change the current directory:
<?php // Get the current directory echo getcwd ( ) . "<br>" ; // Change directory chdir ( "images" ) ; // Obtain the current directory echo getcwd ( ) ; ?>
result:
/home/php /home/php/images
chdir ( directory ) ;
parameter | describe |
---|---|
Directory | Required. Specify the new current directory. |